1. Technical Field
The present invention relates generally to an improved data processing system and in particular to a method and apparatus for processing data. Still more particularly, the present invention relates to a method, apparatus, and computer instructions for managing keepalive transmissions sent between two computers in the TCP/IP protocol.
2. Description of Related Art
In a network, data is transferred between various nodes on the network. These nodes include, for example, client and server computer systems. A server is a service on a network that is shared by multiple clients. A server may refer to both hardware and software or just the software that performs the service. A client is a computer system that accesses a server to obtain services. One set of protocols that is used to handle communications between different computer systems on a network is the Transmission Control Protocol (TCP)/Internet Protocol (IP). TCP provides transport functions to ensure that the total amount of bytes sent is received correctly at the other end. IP is used to accept packets from TCP and adds a header to deliver the packet to a data link layer protocol. An IP address is used by every client and server in the network to send data between the different systems.
A server will often times maintain connections with many clients located on different machines. A keepalive mechanism is implemented in the TCP protocol to convey status information to a connected peer system, such as a server. This mechanism is used to determine whether another computer system is alive or running. Such a mechanism is especially useful in the case in which the computer system at one end of the connection is powered off or rebooted. When a keepalive packet is received thereafter, a reset is sent by the system that was rebooted or powered off and the connection is terminated when the server receives this response. Without such a mechanism, connections are maintained indefinitely even when the other end has been rebooted.
Currently, each connection has its own keepalive mechanism that is used for the particular connection. The present invention recognizes that such a mechanism is wasteful of resources on computer systems, such as server machines which have multiple connections with the same client. For example, a proxy and a back-end server may have multiple connections between these systems. If each connection generates a keepalive packet, the number of packets that is transferred between a server machine and client machines may reach large numbers. For example, a server process on a server computer may maintain thousands of connections with different client computers. In many cases, a keepalive packet is sent about every two hours. As a result, many packets may be sent every second to maintain all of these connections. Such a large scale sending of packets is unnecessary when a large number of connections are between the same two computer systems.
Therefore, it would be advantageous to have an improved method, apparatus, and computer instructions for managing keepalive transmissions.